#ifndef PROVIDENT_OPTION_PRICING_HPP_
#define PROVIDENT_OPTION_PRICING_HPP_

namespace provident
{
    class OptionPricing
    {
    public:
        enum OptionType { 
            AMERICAN_CALL, AMERICAN_PUT, EUROPEAN_CALL, EUROPEAN_PUT
        };

        virtual ~OptionPricing() { }        

        /* Inputs */
        OptionType optionType() const   { return _optionType; }
        double riskFreeRate() const     { return _riskFreeRate; }
        double strikePrice() const      { return _strikePrice; }
        double underlyerPrice() const   { return _underlyerPrice; }
        double volatility() const       { return _volatility; }
        double yearsTilExpiry() const   { return _yearsTilExpiry; }

        virtual double theoreticalPrice() = 0;

        /* First-Order Greeks */
        //virtual double delta() = 0;
        //virtual double rho() = 0;
        //virtual double theta() = 0;
        //virtual double vega() = 0;

        /* Higher-order Greeks */
        //virtual double gamma() = 0;
        
        void setInputs(OptionType const optionType,
                       double const riskFreeRate,
                       double const strikePrice,
                       double const underlyerPrice,
                       double const volatility,
                       double const yearsTilExpiry)
        {
            _optionType = optionType;
            _riskFreeRate = riskFreeRate;
            _strikePrice = strikePrice;
            _underlyerPrice = underlyerPrice;
            _volatility = volatility;
            _yearsTilExpiry = yearsTilExpiry;
        }
    private:
        OptionType _optionType;
        double _riskFreeRate;
        double _strikePrice;
        double _underlyerPrice;
        double _volatility;
        double _yearsTilExpiry;
    };
}

#endif /* PROVIDENT_OPTION_PRICING_HPP_ */

